<?php

/**
 * CelebrioMail MailServer
 *
 * @copyright  Copyright (c) 2011 Celebrio Software
 * @package    CelebrioMail
 */
namespace ApplicationsModule\MailModule;

use \Nette\Object;


/**
 * Mail Server entity
 *
 * @author Celebrio Software
 */
class MailServer extends Object {
    /** @var int */
    private $id = 0;
    /** @var int **/
    private $userid = 0;
    /** @var string */
    private $username = "";
    /** @var string */
    private $password = "";
    /** @var string */
    private $address = "";
    /** @var string */
    private $inserver = "";
    /** @var string */
    private $inprotocol = "";
    /** @var int */
    private $inport = 0;
    /** @var boolean */
    private $inssl = FALSE;
    /** @var string */
    private $outserver = "";
    /** @var int */
    private $outport = 0;
    /** @var boolean */
    private $outssl = FALSE;
    /** @var string */
    private $sentfolder = "";
    /** @var string */
    private $draftsfolder = "";
    /** @var string */
    private $trashfolder = "";
    /** @var string */
    private $spamfolder = "";
    /** @var string */
    private $created = "";
    
    /**
     * Mail Server entity
     * 
     * @author Celebrio Software
     * 
     * @param int $userid
     * @param string $username (e.g. John Smith)
     * @param string $password (e.g. M1ghty^Pa22w0rd)
     * @param string $address (e.g. my@mail.tld)
     * @param string $inserver (e.g. pop3.mailserver.tld)
     * @param string $protocol (e.g. pop3 or imap)
     * @param int $inport (e.g. 110)
     * @param boolean $inssl (e.g. TRUE)
     * @param string $outserver (e.g. smtp.server.tld)
     * @param int $outport (e.g. 25)
     * @param string $outssl (e.g. TRUE) 
     */
    public function __construct($userid=NULL,$username=NULL,$password=NULL,$address=NULL,$inserver=NULL,$protocol=NULL,$inport=NULL,$inssl=NULL,$outserver=NULL,$outport=NULL,$outssl=NULL) {
	$this->userid = $userid;
	$this->username = $username;
	$this->password = $password;
	$this->address = $address;
	$this->inserver = $inserver;
	$this->inprotocol = $protocol;
	$this->inport = $inport;
	$this->inssl = $inssl;
	$this->outserver = $outserver;
	$this->outport = $outport;
	$this->outssl = $outssl;
    }

    /**
     * id getter
     * @return int
     */
    public function getId() {
	return $this->id;
    }

    /**
     * id setter
     * @param int $id
     */
    public function setId($id) {
	$this->id = $id;
    }

    /**
     * user id getter
     * @return int 
     */
    public function getUserid() {
	return $this->userid;
    }

    /**
     * user id setter
     * @param int $userid
     */
    public function setUserid($userid) {
	$this->userid = $userid;
    }

    /**
     * username getter
     * @return string
     */
    public function getUsername() {
	return $this->username;
    }

    /**
     * username setter (e.g. John Smith)
     * @param string $username
     */
    public function setUsername($username) {
	$this->username = $username;
    }

    /**
     * password getter
     * @return string
     */
    public function getPassword() {
	return $this->password;
    }

    /**
     * password setter (e.g. M1ghty^Pa22w0rd)
     * @param string $password
     */
    public function setPassword($password) {
	$this->password = $password;
    }

    /**
     * address getter
     * @return string
     */
    public function getAddress() {
	return $this->address;
    }

    /**
     * address setter (e.g. my@mail.tld)
     * @param string $address
     */
    public function setAddress($address) {
	$this->address = $address;
    }

    /**
     * server getter
     * @return string
     */
    public function getInServer() {
	return $this->inserver;
    }

    /**
     * server setter (e.g. pop3.mailserver.tld)
     * @param string $server
     */
    public function setInServer($server) {
	$this->inserver = $server;
    }

    /**
     * protocol getter
     * @return string
     */
    public function getInProtocol() {
	return $this->inprotocol;
    }

    /**
     * protocol setter (e.g. pop3 or imap)
     * @param string $protocol
     */
    public function setInProtocol($protocol) {
	$this->inprotocol = $protocol;
    }

    /**
     * port getter
     * @return int
     */
    public function getInPort() {
	return $this->inport;
    }

    /**
     * port setter (e.g. 110)
     * @param int $port
     */
    public function setInPort($port) {
	$this->inport = $port;
    }

    /**
     * ssl getter, whether a secured connection is allowed
     * @return boolean
     */
    public function getInSSL() {
	return $this->inssl;
    }

    /**
     * ssl setter, whether a secured connection is allowed (e.g. TRUE)
     * @param boolean $ssl
     */
    public function setInSSL($ssl) {
	$this->inssl = $ssl;
    }

    /**
     * created getter (String/Date)
     * @return string
     */
    public function getCreated() {
	return $this->created;
    }

    /**
     * created setter (String/Date)
     * @param string $created
     */
    public function setCreated($created) {
	$this->created = $created;
    }

    /**
     * outgoing server getter
     * @return string
     */
    public function getOutServer() {
	return $this->outserver;
    }

    /**
     * outgoing server setter (e.g. smtp.server.tld)
     * @param string $outserver
     */
    public function setOutServer($outserver) {
	$this->outserver = $outserver;
    }

    /**
     * outgoing port getter
     * @return int
     */
    public function getOutPort() {
	return $this->outport;
    }

    /**
     * outgoing port setter (e.g. 25)
     * @param int $outport
     */
    public function setOutPort($outport) {
	$this->outport = $outport;
    }

    /**
     * outgoing ssl getter, whether outgoing connection should be secured
     * @return boolean
     */
    public function getOutSSL() {
	return $this->outssl;
    }

    /**
     * outgoing ssl setter (e.g. TRUE) whether outgoing connection should be secured
     * @param boolean $outssl
     */
    public function setOutSSL($outssl) {
	$this->outssl = $outssl;
    }

    /**
     * Sent folder getter
     * @return string
     */
    public function getSentFolder() {
	return $this->sentfolder;
    }

    /**
     * Sent folder setter {e.g. Sent}
     * @param string $sentfolder
     */
    public function setSentFolder($sentfolder) {
	$this->sentfolder = $sentfolder;
    }

    /**
     * Drafts folder getter
     * @return string
     */
    public function getDraftsFolder() {
	return $this->draftsfolder;
    }

    /**
     * Drafts folder setter (e.g. Drafts)
     * @param string $draftsfolder
     */
    public function setDraftsFolder($draftsfolder) {
	$this->draftsfolder = $draftsfolder;
    }

    /**
     * Trash folder getter
     * @return string
     */
    public function getTrashFolder() {
	return $this->trashfolder;
    }

    /**
     * Trash folder setter (e.g. Trash)
     * @param string $trashfolder
     */
    public function setTrashfolder($trashfolder) {
	$this->trashfolder = $trashfolder;
    }

    /**
     * Spam folder getter
     * @return string
     */
    public function getSpamFolder() {
	return $this->spamfolder;
    }

    /**
     * Spam folder setter (e.g. Spam)
     * @param string $spamfolder
     */
    public function setSpamfolder($spamfolder) {
	$this->spamfolder = $spamfolder;
    }

}